package com.ahdy.controller;

import com.ahdy.tool.getSong;
import org.springframework.web.bind.annotation.*;

import java.io.IOException;

/**
 * 一些其余接口
 */
@CrossOrigin
@RestController
@RequestMapping("/api/dashboard")
public class ApiDataController {

    @GetMapping(value = "/getWeather", produces = "application/json;charset=UTF-8")
    public String getWeather(@RequestParam(defaultValue = "蚌埠") String city) throws IOException {
        String result = getSong.getWeather(city);
        System.out.println(result);
        return result;
    }

}
